package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.PrizeDrawActivitySettleRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.vo.ListOfWinnersVO;
import com.sc.nft.entity.vo.LotteryDataPageVO;
import com.sc.nft.entity.vo.MyListWinnersVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 抽奖活动结算记录表(sc_prize_draw_activity_settle_records)数据Mapper
 *
 * @author Sun
 * @since 2023-09-14 11:32:52
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface PrizeDrawActivitySettleRecordsMapper extends BaseMapper<PrizeDrawActivitySettleRecords> {

    /**
     * 获取我的中奖结果
     * @param activityId
     * @param userId
     * @return
     */
    List<MyListWinnersVO> myListWinners(@Param("activityId") Long activityId,@Param("userId") Long userId);

    /**
     * 查询所有的中奖结果
     * @param activityId
     * @return
     */
    List<ListOfWinnersVO> listOfWinners(@Param("activityId") Long activityId);

    /**
     * 查询所有的中奖结果(竞猜)
     * @param page
     * @param activityId
     * @return
     */
    IPage<LotteryDataPageVO> guessLotteryDataPageByActivityId(Page page,@Param("activityId") Long activityId,@Param("userTel") String userTel,@Param("lotteryDrawResultVar")String lotteryDrawResultVar,@Param("typeName")String typeName);

    /**
     * 查询所有的中奖结果(瓜分)
     * @param page
     * @param activityId
     * @return
     */
    IPage<LotteryDataPageVO> carveUpLotteryDataPageByActivityId(Page page, @Param("activityId")Long activityId,@Param("userTel") String userTel,@Param("lotteryDrawResultVar")String lotteryDrawResultVar,@Param("typeName")String typeName);

    /**
     * 查询要发放奖励的记录
     * @return
     */
    List<PrizeDrawActivitySettleRecords> getListByIsSettleAndStatus();
}
